package com.yanggu.scala.chapater03

import scala.io.StdIn

object InputDemo {

  def main(args: Array[String]): Unit = {
//    要求：可以从控制台输入：姓名、年龄、薪水
    println("请输入姓名")
    val name = StdIn.readLine
    println("请输入年龄")
    val age = StdIn.readInt
    println("请输入薪水")
    val salary = StdIn.readDouble()
    printf("用户的信息为name = %s, age = %d, salary = %.2f", name, age, salary)
  }

}
